]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
introspect: Add WindowsChanged signal
authorCenk Uluisik <cenk.uluisik@googlemail.com>
Sun, 6 Mar 2022 18:32:48 +0000 (19:32 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 8 Mar 2022 16:31:20 +0000 (16:31 +0000)
The screencast portal supports recording a single window,
and presents a list of open windows when that option is
selected. To allow updating that list when windows are
opened or closed, add a new "WindowsChanged" signal that
the portal can listen to.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2229>

data/dbus-interfaces/org.gnome.Shell.Introspect.xml
js/misc/introspect.js

index 47fd7efdc236767f850841780be5638caa287f80..cb19cfec562ae76ebcf2a47f2c83cfe7a489e01d 100644 (file)
     -->
     <signal name="RunningApplicationsChanged" />
 
+    <!--
+        WindowsChanged:
+        @short_description: Notifies when any window opens or closes
+    -->
+    <signal name="WindowsChanged" />
+
     <!--
         GetRunningApplications:
         @short_description: Retrieves the description of all running applications
index 45eee81ce37944133cfad02d3f8375aeff5a8ed6..8916804e7f64eaf8de0c1f80f0811be92900a7fc 100644 (file)
@@ -42,6 +42,9 @@ var IntrospectService = class {
                             this._syncRunningApplications();
                         });
 
+        tracker.connect('tracked-windows-changed',
+            () => this._dbusImpl.emit_signal('WindowsChanged', null));
+
         this._syncRunningApplications();
 
         this._senderChecker = new DBusSenderChecker(APP_ALLOWLIST);